<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="refresh" content="3000;url=#">
<link rel="stylesheet" type="text/css" href="${contextPath}/fullcalendar/fullcalendar/fullcalendar.css"> 
<link rel="stylesheet" type="text/css" href="${contextPath}/fullcalendar/fullcalendar/fancybox.css"> 
<style type="text/css">
#calendar{width:960px; margin:20px auto 10px auto}
.fancy{width:450px; height:auto}
.fancy h3{height:30px; line-height:30px; border-bottom:1px solid #d3d3d3; font-size:14px}
.fancy form{padding:10px}
.fancy p{height:28px; line-height:28px; padding:4px; color:#999}
.input{height:20px; line-height:20px; padding:2px; border:1px solid #d3d3d3; width:100px}
.btn{-webkit-border-radius: 3px;-moz-border-radius:3px;padding:5px 12px; cursor:pointer}
.btn_ok{background: #360;border: 1px solid #390;color:#fff}
.btn_cancel{background:#f0f0f0;border: 1px solid #d3d3d3; color:#666 }
.btn_del{background:#f90;border: 1px solid #f80; color:#fff }
.sub_btn{height:32px; line-height:32px; padding-top:6px; border-top:1px solid #f0f0f0; text-align:right; position:relative}
.sub_btn .del{position:absolute; left:2px}
</style>
<script src="${contextPath}/fullcalendar/jquery/jquery-1.9.1.min.js"></script> 
<script src="${contextPath}/fullcalendar/jquery/jquery-migrate-1.1.0.js"></script> 
<script src="${contextPath}/fullcalendar/jquery/jquery-ui-1.10.2.custom.min.js"></script> 
<script src="${contextPath}/fullcalendar/fullcalendar/fullcalendar.min.js"></script> 
<script src="${contextPath}/fullcalendar/jquery/jquery.fancybox-1.3.1.pack.js"></script> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>FULLcalendar测试专用</title>
</head>
<body>
<div id='calendar' ></div>
<script type="text/javascript">
$(document).ready(function() { 
	var date = new Date();
	var d = date.getDate();
	var m = date.getMonth();
	var y = date.getFullYear(); 
 
    $('#calendar').fullCalendar({ 
    	
        header: {//设置日历头部信息 
            left: 'prev,next today', 
            center: 'title', 
            right: 'month,agendaWeek,agendaDay' 
        }, 
    	dayClick: function(date, allDay, jsEvent, view) {
			var selDate =$.fullCalendar.formatDate(date,'yyyy-MM-dd');
			$.fancybox({
				'type':'ajax',
				'href':'${contextPath}/fullcalendar/event.jsp?action=add&date='+selDate
			});
    	},
    	//单击事件项时触发 
        eventClick: function(calEvent, jsEvent, view) { 
            $.fancybox({ 
                'type':'ajax', 
                'href':"${contextPath}/fullcalendar/event.jsp?action=edit&id="+calEvent.id 
            }); 
        },

        firstDay:1,//每行第一天为周一 
        editable: true,//可以拖动 	
    
  /*      events:[
               {title:'1',
            	start:new Date(y,m,d)}
               ] */
 		events:"${contextPath}/findEvents"   //事件数据 
 	//events:[{"id":1,"title":"222","color":"blue","start":"2014-11-18 00:00:00","allday":false,"end":null}]
 	
    }); 
}); </script>
</body>
</html>